package com.myapp.exception;

/**
 * when accept the parameter which is required but null,or among the specified ranges but
 *  exceed 
 * @author peng
 */
public class ParameterException extends RuntimeException {
	
	private static final long serialVersionUID = 5530538095255404280L;
	
	enum ExceptionType{required,exceed,notmatched,invalid};
	
	private ExceptionType type;
	private String name;
	
	ParameterException(ExceptionType type,String name,String message)
	{
		super(message);
		this.type = type ;
		this.name = name ;
	}

	public ExceptionType getType() {
		return type;
	}

	public String getName() {
		return name;
	}
}
